from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User

from system.models import SystemUser

class SystemUserInline(admin.StackedInline):

    model = SystemUser
    can_delete = False
    verbose_name_plural = "system_user"


class UserAdmin(BaseUserAdmin):
    inlines = [SystemUserInline]



admin.site.unregister(User)
admin.site.register(User, UserAdmin)